<script type=\"text/javascript\">

			  var _gaq = _gaq || [];
			  _gaq.push(['_setAccount', 'UA-7309189-3']);
			  _gaq.push(['_setDomainName', '.xivpads.com']);
			  _gaq.push(['_trackPageview']);

			  (function() {
				var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
				ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
				var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
			  })();

			</script>

<?

include 'includes/specs_defines_tables.php';

#-------------------------------$Session information
$userCICUID = $Session->Character;
#---------------------------------------------------



$version = "?version=1.4"; // To garantuee css freshness on change

/* HOW TO GET PAD USER ???? */
//$padCICUID =  $_POST['CICUID'];
//$padCICUID = 9545338;  // Nemi Chan


if($CICUID!= ""){

	echo "<script>
	var CICUID = '".$CICUID."';
	var THEME = '".$Session->Theme."';
	var AVATAR = '".$Avatar	."'
	</script>";

	$table = SPEC_TBL_SPECS." as spec";
	$col = array("COUNT(spec.".SPEC_TBL_SPECS_ID.") as count");
	$where = array("spec.".SPEC_TBL_SPECS_USER_ID." = \"".$CICUID."\"");
	$orderBy = "spec.".SPEC_TBL_SPECS_ID;
	$direction = "ASC";
	
	$result = $DB->GetData($table ,$col ,true ,$where, $orderBy, $direction);
	
	foreach ($result[3] as $row) {
	
		$count = $row['count'];
	}
	
	if($count > 0){
			
		if($Session->Theme=="dark"){
			$output .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"specs/js/srating/jquery.ui.stars.css.gz?v=3.0.0b38\"/>
			<link href=\"specs/css/main.css".$version."\" rel=\"stylesheet\" type=\"text/css\">";
		}else{
			$output .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"specs/js/srating/jquery.ui.stars.white.css?v=3.0.0b38\"/>
			<link href=\"specs/css/main_white.css".$version."\" rel=\"stylesheet\" type=\"text/css\">";			
		}

		
		$output .= "
			<!-- User Window -->
			<script type=\"text/javascript\" src=\"specs/js/srating/jquery.ui.stars.js?v=3.0.0b38\"></script>
			<!-- CUSTOM -->
			<script type=\"text/javascript\" src=\"specs/js/main.js".$version."\"></script>
			<script type=\"text/javascript\" src='specs/js/spec.js".$version."'></script>
			<script>
				$(document).ready(function(){
					$('.show-user').click(function(e) {	
						var id = $(this).attr('id');
						getUser(id);
					});
					loadSpecList('".$CICUID."');
				});		
			
			</script>
			<div id='indent-content-container' class='specs me-content-container' style='margin-left: 20px;margin-right: 20px;padding-top: 20px;margin-bottom: 20px;'> 
				<div id='spec-detail' class='fl-left' style='height: 266px;'>
					<div class = 'content-subtitle-container-left fl-left' style='height: 265px;'></div>
					<div class='fl-right'>
						<div id='spec-detail-content' class='fl-left' style='width: 368px;height: 266px;'></div>
						<div class = 'content-subtitle-container-right fl-right' style='height: 265px;'></div>
					</div>
				</div>
				<div id='spec-list-container' class='fl-right' style='width: 379px;'>
					<div class = 'content-subtitle-container-open'></div>
					<div id = 'spec-list' class='spec-list'></div>
					<div style='clear:both;'></div>
					<div class = 'content-subtitle-container-close'></div>
				</div>
				<div style='clear:both; height:5px;'></div>
				<div class = 'content-subtitle-container-open'></div>
				<div id='spec-comments-out' style='min-height: 576px;'>
					<div id='spec-comments' class='spec-comments'>
					</div>
				</div>
				<div class = 'content-subtitle-container-close'></div>
			</div>";
		echo $output;
	}else{
	
		echo "<div class=\"nofriends\">
				You have yet to create a spec. Click <strong>Specs</strong> to be able to browse specs <br> and then click <strong>Create</strong> in the sub-menu or on an <strong>Empty-slot</strong> in your <strong>Own specs</strong> window. <br>You will then see all your created specs here!
			</div>";
	
	
	}
	
}
		




?>


		
